using System;
using UnityEngine;

[Serializable]
public class line : MonoBehaviour
{
	public Color c1;

	public Color c2;

	public int lengthOfLineRenderer;

	public line()
	{
		c1 = Color.yellow;
		c2 = Color.red;
		lengthOfLineRenderer = 20;
	}

	public void Start()
	{
		LineRenderer lineRenderer = (LineRenderer)gameObject.AddComponent(typeof(LineRenderer));
		lineRenderer.material = new Material(Shader.Find("Particles/Additive"));
		lineRenderer.SetColors(c1, c2);
		lineRenderer.SetWidth(0.2f, 0.2f);
		lineRenderer.SetVertexCount(lengthOfLineRenderer);
	}

	public void Update()
	{
		LineRenderer lineRenderer = (LineRenderer)GetComponent(typeof(LineRenderer));
		for (int i = 0; i < lengthOfLineRenderer; i++)
		{
			Vector3 position = new Vector3((float)i * 0.5f, Mathf.Sin((float)i + Time.time), 0f);
			lineRenderer.SetPosition(i, position);
		}
	}

	public void Main()
	{
	}
}
